using System;
using System.Collections.Generic;
using Framework.Core.Data;

namespace Framework.Core.Search
{
    public interface ISearcher
    {
        event SelectedSearchItemChangedHandler OnSelectedSearchItemChanged;

        event SelectedSearchItemTypeChangedHandler OnSelectedSearchItemTypeChanged;

        event SelectedSearchOperatorChangedHandler OnSearchOperatorChanged;

        event AppendSearchConditionHandler OnAppendSearchCondition;

        DataBaseType DBType
        {
            get;
            set;
        }

        SearchLogicItemCollection Logic
        {
            get;
        }

        SearchItemCollection Items
        {
            get;
            set;
        }

        SearchOperatorItemCollection Operators
        {
            get;
        }

        string Value
        {
            get;
            set;
        }

        SearchConditionCollection SearchConditions
        {
            get;
            set;
        }

        int SelectedItemIndex
        {
            get;
            set;
        }

        int SelectedOperatorIndex
        {
            get;
            set;
        }

        string ConditionExpression
        {
            get;
        }

        string ConditionDescription
        {
            get;
        }

        void AppendSearchCondition(ISearchCondition condition, ISearchCondition beforeCondition);

        void ClearSearchConditions();
    }
}
